home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 674 < prev    next >
Text File  |  1996-08-06  |  2KB  |  34 lines

  1. Path: netline-fddi.jpl.nasa.gov!usenet
  2. From: kdq@emoryi.jpl.nasa.gov (Kevin D. Quitt)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Prefixing functions with return type..
  5. Date: Sat, 30 Mar 1996 20:49:54 GMT
  6. Organization: Jet Propulsion Laboratory
  7. Message-ID: <315d9d7f.10160930@netline-fddi.jpl.nasa.gov>
  8. References: <4hstf8$jf3@cybernews.cyberus.ca> <1996Mar14.080731.15076@Watt.COM> <1996Mar18.201616.6958@Watt.COM>
  9. Reply-To: kdq@emoryi.jpl.nasa.gov
  10. NNTP-Posting-Host: emoryi.jpl.nasa.gov
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=US-ASCII
  13. Content-Transfer-Encoding: 7bit
  14. X-Newsreader: Forte Agent .99d/32.182
  15.  
  16. On Mon, 18 Mar 96 20:16:16 GMT, Adrian P Stephens <aps@symbionics.co.uk> >Ours
  17. >has "C" coding standards which require this kind of thing.   Initially
  18. >I was against it,  because it makes things cluttered,   lengthens lines
  19. >of code and makes for more typing.
  20.  
  21. It does more than that: it makes the code less supportable.  When the type of
  22. a variable has to change, every occurence of it has to be changed in the text.
  23. It also goes against the philosophical ideal of information hiding, and lulls
  24. the user into not having the compiler/lint perform strict type-checking (since
  25. 'it's obvious' what the type is).
  26.  
  27. I think it's better to give a variable a human-meaningful name that describes
  28. its function, and use the compiler to enforce and report typing problems.
  29.  
  30. -- 
  31. #include <standard_disclaimer.h>                 http://emoryi.jpl.nasa.gov/
  32.  _
  33. Kevin D Quitt  USA 91351-4454           96.37% of all statistics are made up
  34.